<?php
// File Security Check
if ( ! empty( $_SERVER['SCRIPT_FILENAME'] ) && basename( __FILE__ ) == basename( $_SERVER['SCRIPT_FILENAME'] ) ) :
	die ( 'You do not have sufficient permissions to access this page!' );
endif;

get_header(); ?>

<?php get_template_part( 'page-title' ); ?>

<!-- BEGIN #container -->
<div id="container" class="clearfix">

		<!-- BEGIN #content -->
		<section class="col-full clearfix service <?php echo $post->post_name; ?>">

			<?php

			$paged = ( get_query_var( 'paged' ) ) ? get_query_var( 'paged' ) : 1;

			if ( have_posts() ) :

				$count = 0;
				$columns = 1; ?>
				<ul id="services" class="one-col-grid grid service-grid clearfix">

				<?php while ( have_posts() ) :
						the_post();
						$count++;

						$terms = get_the_terms( get_the_ID(), 'service-category' ); ?>

						<li data-id="id-<?php echo $count; ?>" class="<?php if ( $terms ) : foreach ( $terms as $term ) : echo 'term-' . $term->term_id . ' '; endforeach; endif; ?> clearfix">
							<div class="boxgrid caption">

								<?php if ( has_post_thumbnail() ) : ?>
										<div class="thumb view view-more">
											<a href="<?php the_permalink(); ?>" title="<?php printf( __( 'Permanent Link to %s', 'nicethemes' ), get_the_title() ); ?>">
												<?php nice_image( array( 'key' => 'service-image', 'width'  => 480, 'height' => 480 ) ) ; ?>
												<div class="mask"></div>
											</a>
										</div>
								<?php endif; ?>

								<span class="entry-title">
									<a href="<?php the_permalink(); ?>" rel="bookmark" title="<?php printf( __( 'Permanent Link to %s', 'nicethemes' ), get_the_title() ); ?>"><?php the_title(); ?></a>
								</span>

							</div>
							<div class="excerpt-wrapper">
								 <?php the_excerpt(); ?>
							</div>
						</li>

				<?php endwhile; ?>

				</ul>

				<?php endif; ?>

		<!-- END #content -->
		</section>

<!-- END #container -->
</div>

<?php get_footer(); ?>